let reg_vm = new Vue({
    el:"form",
    data:{},
    methods:{
        reg:function () {
            let data = new FormData(document.querySelector("form"))
            let pwd =data.get("password");
            let pwd1 = data.get("passwordPlus");
            if(pwd==pwd1){
                axios.post("/user/reg",data).then(function (response) {
                    if(response.data==1){
                        alert("注册成功");
                        location.herf="/index.html";
                    }else{
                        alert("用户名已存在");
                    }
                })
            }else{
                alert("密码不一致")
                location.reload();
            }

        }
    }
})